const user = {
	state: {
		token: uni.getStorageSync('token'),
		// 用户信息
		user: uni.getStorageSync('user') ? JSON.parse(uni.getStorageSync('user')) : {},
	},
	mutations: {
		SET_USER: (state, data) => {
			state.user = data
		},
		SET_TOKEN: (state, data) => {
			state.user.token = data
		}
	},
	actions: {
	}
}

export default user